package com.maotai.main;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import com.maotai.dao.QiangGouDao;

public class MaoTaiUpdateLatitude {

	public static void main(String[] args) {
		QiangGouDao qgs = new QiangGouDao();
		Connection c = null;
		try {
			Class.forName("com.mysql.jdbc.Driver");
			c = DriverManager
					.getConnection("jdbc:mysql://localhost:3306/23maotai?user=root&password=123456&useUnicode=true&characterEncoding=utf8");
			System.out.println("Opened database successfully");
			qgs.updateLatitude(c);
		} catch (Exception e1) {
			e1.printStackTrace();
		} finally {
			if (c != null)
				try {
					c.close();
					System.out.println("close database successfully");
				} catch (SQLException e) {
				}
		}

	}
	
}
